package com.example.message.demo;

import java.util.List;
import org.springframework.data.repository.CrudRepository;

public interface UserRepository extends CrudRepository<User, String> {
    //继承了 CrudRepository 支撑增删查改
    List<User> findByUsername(String username);
    //相当于sql 中的 `SELECT * FROM UserRepository WHERE username = 'username' `

}

